import os


def get_image_names(folder_path):
    # print(os.getcwd())
    image_names = []
    for name in os.listdir(folder_path):
        if name.lower().endswith(('.png', '.jpg', '.jpeg', '.gif')):
            image_names.append(name)
    return image_names

if __name__ == '__main__':
    file='./static/img_top20'
    name = get_image_names(file)
    print(name)